{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2023-06-16T08:35:26.876853Z",
     "start_time": "2023-06-16T08:35:24.737223Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Looking in indexes: https://pypi.douban.com/simple/\r\n",
      "Requirement already satisfied: langchain in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (0.0.200)\r\n",
      "Requirement already satisfied: PyYAML>=5.4.1 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from langchain) (6.0)\r\n",
      "Requirement already satisfied: SQLAlchemy<3,>=1.4 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from langchain) (2.0.15)\r\n",
      "Requirement already satisfied: aiohttp<4.0.0,>=3.8.3 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from langchain) (3.8.4)\r\n",
      "Requirement already satisfied: async-timeout<5.0.0,>=4.0.0 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from langchain) (4.0.2)\r\n",
      "Requirement already satisfied: dataclasses-json<0.6.0,>=0.5.7 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from langchain) (0.5.7)\r\n",
      "Requirement already satisfied: langchainplus-sdk>=0.0.9 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from langchain) (0.0.10)\r\n",
      "Requirement already satisfied: numexpr<3.0.0,>=2.8.4 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from langchain) (2.8.4)\r\n",
      "Requirement already satisfied: numpy<2,>=1 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from langchain) (1.23.5)\r\n",
      "Requirement already satisfied: openapi-schema-pydantic<2.0,>=1.2 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from langchain) (1.2.4)\r\n",
      "Requirement already satisfied: pydantic<2,>=1 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from langchain) (1.10.7)\r\n",
      "Requirement already satisfied: requests<3,>=2 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from langchain) (2.28.2)\r\n",
      "Requirement already satisfied: tenacity<9.0.0,>=8.1.0 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from langchain) (8.2.2)\r\n",
      "Requirement already satisfied: attrs>=17.3.0 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (23.1.0)\r\n",
      "Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (3.1.0)\r\n",
      "Requirement already satisfied: multidict<7.0,>=4.5 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (6.0.4)\r\n",
      "Requirement already satisfied: yarl<2.0,>=1.0 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.9.2)\r\n",
      "Requirement already satisfied: frozenlist>=1.1.1 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.3.3)\r\n",
      "Requirement already satisfied: aiosignal>=1.1.2 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.3.1)\r\n",
      "Requirement already satisfied: marshmallow<4.0.0,>=3.3.0 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from dataclasses-json<0.6.0,>=0.5.7->langchain) (3.19.0)\r\n",
      "Requirement already satisfied: marshmallow-enum<2.0.0,>=1.5.1 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from dataclasses-json<0.6.0,>=0.5.7->langchain) (1.5.1)\r\n",
      "Requirement already satisfied: typing-inspect>=0.4.0 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from dataclasses-json<0.6.0,>=0.5.7->langchain) (0.8.0)\r\n",
      "Requirement already satisfied: typing-extensions>=4.2.0 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from pydantic<2,>=1->langchain) (4.5.0)\r\n",
      "Requirement already satisfied: idna<4,>=2.5 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from requests<3,>=2->langchain) (3.4)\r\n",
      "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from requests<3,>=2->langchain) (1.26.15)\r\n",
      "Requirement already satisfied: certifi>=2017.4.17 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from requests<3,>=2->langchain) (2022.12.7)\r\n",
      "Requirement already satisfied: packaging>=17.0 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from marshmallow<4.0.0,>=3.3.0->dataclasses-json<0.6.0,>=0.5.7->langchain) (23.1)\r\n",
      "Requirement already satisfied: mypy-extensions>=0.3.0 in /Users/dingwenjiang/.pyenv/versions/3.10.11/envs/openai310/lib/python3.10/site-packages (from typing-inspect>=0.4.0->dataclasses-json<0.6.0,>=0.5.7->langchain) (1.0.0)\r\n"
     ]
    }
   ],
   "source": [
    "!pip install langchain --upgrade"
   ]
  },
  {
   "cell_type": "markdown",
   "source": [
    "# LLM Example\n",
    "In LLM example, we will use `text-davinci-003` model, and use Azure as the proxy server."
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " I have always had a love for colorful socks. I have seen a lot of sock companies around, but I want to create one that is fun and colorful.\n",
      "\n",
      "How about \"Funky Footwear\" or \"Sock It To Me\". I'm sure there are many more clever names that will be suggested. When you come up with a name, be sure to let us know the name of your company.\n",
      "\n",
      "By Cricket [205 Posts, 895 Comments] September 28, 2011 0 found this helpful\n",
      "\n",
      "How about \"Colorful Toes\" or \"Sock Hop\" or \"Sock Opera\"?\n",
      "\n",
      "Ad\n",
      "\n",
      "Or you could use a play on words and use your name. Such as if your name is Jones, you could call it \"Jonesing for Socks\". Or if your name is Green, you could call it \"Green Sock\" (sounds like Grinch, so you could even play off that!).\n",
      "\n",
      "Reply Was this helpful? Yes\n",
      "\n",
      "By Donna [413 Posts, 402 Comments] September 28, 2011 0 found this helpful\n",
      "\n",
      "Sock It To Me is a great name! How about \"Feet Treats\" or \"Colorful Soles\" or \"Sock It Up?\" I love the idea of a new sock company and\n"
     ]
    }
   ],
   "source": [
    "from langchain.llms import OpenAI\n",
    "llm = OpenAI(\n",
    "    openai_api_key=\"ANYTHING or None, if set None, plz ensure you have set azure apikey in the proxy server\",\n",
    "    openai_api_base=\"http://127.0.0.1:8080/v1\"\n",
    ")\n",
    "text = \"What would be a good company name for a company that makes colorful socks?\"\n",
    "print(llm(text))"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2023-06-16T08:35:40.753272Z",
     "start_time": "2023-06-16T08:35:30.493555Z"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "# Chat Example\n",
    "In Chat example, we will use `gpt-3.5-turbo` model."
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "content=\"J'aime programmer.\" additional_kwargs={} example=False\n"
     ]
    }
   ],
   "source": [
    "from langchain.chat_models import ChatOpenAI\n",
    "from langchain.schema import (\n",
    "    AIMessage,\n",
    "    HumanMessage,\n",
    "    SystemMessage\n",
    ")\n",
    "chat = ChatOpenAI(\n",
    "    openai_api_key=\"ANYTHING or None, if set None, plz ensure you have set azure apikey in the proxy server\",\n",
    "    openai_api_base=\"http://127.0.0.1:8080/v1\",\n",
    "    temperature=0\n",
    ")\n",
    "print(chat([HumanMessage(content=\"Translate this sentence from English to French. I love programming.\")]))"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2023-06-16T08:35:56.013685Z",
     "start_time": "2023-06-16T08:35:55.380708Z"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "# Embedding Example\n",
    "In Embedding example, we will use `text-embedding-ada-002` model. After embedding, we always get 1536 dimension vector."
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[-0.003158408682793379, 0.011094409972429276, -0.0040013170801103115, -0.011747414246201515, -0.0010153218172490597, 0.010781234130263329, -0.010368109680712223, -0.005297331139445305, -0.009881687350571156, -0.02616015262901783, 0.020376399159431458, 0.022575292736291885, -0.007522876374423504, 0.01728462427854538, -0.006003641523420811, 0.01912369765341282, 0.02125595696270466, -0.015645449981093407, 0.007669468875974417, -0.018364081159234047, -0.0006909018848091364, -0.006416766904294491, -0.01098113413900137, 0.017950955778360367, -0.02213551290333271, -0.003076783148571849, 0.01437942124903202, -0.029984891414642334, 0.01852400042116642, -0.007916011847555637, 0.010068260133266449, -0.019456863403320312, -0.003688141703605652, -0.024241119623184204, -0.005530546884983778, 0.003824739484116435, -0.005653818137943745, -0.029451826587319374, 0.018603960052132607, -0.016618292778730392, 0.00752953952178359, 0.012420408427715302, -0.0009903343161568046, -0.010721264407038689, 0.01000162772834301, -0.012560337781906128, 0.033529773354530334, -0.02699972875416279, -0.00792933814227581, 0.029025375843048096, 0.019696742296218872, -0.002077286597341299, -0.02739952877163887, -0.008775578811764717, -0.006213536020368338, 0.0019939953926950693, -0.00738294655457139, 0.02798589877784252, 0.006829892285168171, -0.009315306320786476, -0.02248200587928295, 0.010468059219419956, -0.013546507805585861, -0.011094409972429276, -0.004887537565082312, -0.008275830186903477, -0.005823732353746891, 0.011114399880170822, 0.006276837550103664, 0.004434432368725538, 0.01056800875812769, 0.012480378150939941, 0.005337310954928398, 0.005393948871642351, 0.008988804183900356, 0.004261186346411705, -0.022681904956698418, -0.013233331963419914, 0.011201023124158382, -0.005753767676651478, 0.00982838124036789, -0.024401038885116577, -0.00858234241604805, 0.007829388603568077, 0.0025037385057657957, 0.007549529429525137, 0.005747104529291391, 0.02817247249186039, -0.02290845662355423, -0.015525510534644127, -0.008182544261217117, 0.02005656063556671, 0.003568202257156372, 0.012786890380084515, -0.01645837351679802, 0.03155743330717087, 0.013506527990102768, 0.030437996610999107, -0.006240189075469971, -0.049681633710861206, -0.003728121519088745, -0.0013001782353967428, -0.007063108030706644, 0.003524890635162592, -0.034835781902074814, -0.009062101133167744, 0.021975593641400337, -0.007236354053020477, 0.015485530719161034, -0.008295820094645023, -0.01644504815340042, 0.005060783587396145, -0.006390113849192858, -0.0361151359975338, 0.015618797391653061, 0.005653818137943745, 0.006503389682620764, -0.02189563401043415, -0.010248169302940369, 0.0010503041557967663, 0.0006350966868922114, 0.016938133165240288, 0.02651997096836567, -0.027506140992045403, 0.010548018850386143, 0.013273311778903008, -0.00882222130894661, -0.041872236877679825, -0.0064933947287499905, -0.005567194893956184, 0.019137024879455566, 0.02148250862956047, 0.014192848466336727, 0.01751117780804634, -0.023348236456513405, 0.03734118491411209, -0.04040630906820297, 0.024774184450507164, -0.0432048961520195, -0.00840909592807293, 0.008309146389365196, 0.027372874319553375, -0.019150350242853165, -0.016964785754680634, 0.010288150049746037, 0.01399294938892126, 0.008262503892183304, -0.024840816855430603, 0.012493705376982689, -0.021056057885289192, 0.0031051021069288254, 0.0017724402714520693, 0.0177643820643425, 0.0025603766553103924, 0.01556549035012722, 0.03147747367620468, 0.003858056152239442, -0.009548522531986237, -0.01800426095724106, -0.019616782665252686, 0.0031034364365041256, 0.022162167355418205, 0.009568512439727783, 0.0018540658056735992, 0.023454848676919937, 0.03467586264014244, 0.004004648886620998, 0.007669468875974417, -0.0016133537283167243, -0.01541889738291502, -0.02502739056944847, 0.024760857224464417, -0.02538720890879631, 0.00764947896823287, -0.02017650008201599, 0.014299461618065834, 0.00718971062451601, 0.003481579013168812, -0.004424437414854765, -0.004054623655974865, -0.03390291705727577, 0.016844846308231354, 0.0147925466299057, 0.03185061737895012, -0.017004765570163727, -0.0069365049712359905, 0.024241119623184204, -0.009541858918964863, 0.001388467033393681, -0.0046343314461410046, 0.02314833737909794, 0.021935613825917244, -0.006290163844823837, -0.014805872924625874, -0.7023661136627197, -0.016351761296391487, 0.004261186346411705, -0.017311276867985725, 0.022175492718815804, 0.031370859593153, 0.024640917778015137, 0.0020939449314028025, -0.005986983422189951, 0.021855654194951057, -0.02266857773065567, -0.012700267136096954, -0.00920203048735857, -0.013206679373979568, -0.014139542356133461, -0.02314833737909794, -0.016951458528637886, -0.003324991324916482, -0.017604462802410126, 0.013106729835271835, 0.014979119412600994, 0.01547220442444086, -0.015712084248661995, -0.016711579635739326, 0.0005126583855599165, 0.00893549807369709, 0.013100066222250462, -0.006123581435531378, 0.017484523355960846, 0.016884826123714447, -0.026240112259984016, -0.0035215590614825487, -0.0009320303797721863, 0.008535698987543583, 0.033236585557460785, -0.0020672916434705257, -0.014472708106040955, -0.02504071593284607, 0.016604967415332794, 0.0009203695808537304, -0.01680486649274826, -0.00034961552591994405, 0.004830899182707071, -0.001729128765873611, -0.004571030382066965, -0.0024737536441534758, 0.01883051171898842, 0.0003673149331007153, 0.027452833950519562, 0.017684422433376312, -0.0165783129632473, -0.0005447255098260939, 0.006663309410214424, -0.003518227254971862, 0.0010453066788613796, -0.01042141579091549, 0.02160244807600975, 0.007756092119961977, 0.01083454117178917, 0.016604967415332794, -0.0011510866461321712, 0.011860691010951996, -0.005657149478793144, -0.0168714988976717, -0.02894541621208191, -0.0074962228536605835, -0.02077619917690754, 0.022535312920808792, 0.0010594661580398679, -0.01899043098092079, -0.003758106380701065, 0.012520357966423035, -0.010261496528983116, -0.019723394885659218, 0.020749544724822044, 0.015485530719161034, 0.009761747904121876, -0.00994832068681717, -0.00935528613626957, 0.016778212040662766, 0.0037014682311564684, 0.003621508600190282, -0.014366094954311848, -0.01541889738291502, 0.010847867466509342, -0.020283114165067673, -0.04611010104417801, -0.012960136868059635, -0.0066999574191868305, 0.013386588543653488, 0.02160244807600975, 0.0014384419191628695, -0.00795599166303873, -0.00046601518988609314, 0.00890884455293417, -0.0028002557810395956, 0.001188567839562893, 0.003934684209525585, 0.030091505497694016, -0.0019306938629597425, 0.0015000775456428528, 0.002447100356221199, 0.0006804904551245272, 0.011740750633180141, 0.02112269029021263, 0.005224034655839205, 0.0036481618881225586, 0.024467671290040016, 0.018270794302225113, -0.00849571917206049, -0.007169720716774464, -0.00899546779692173, -0.009535195305943489, 0.0015650447458028793, -0.016071902588009834, -0.03416945040225983, 0.00798930786550045, 0.011241002939641476, 0.002340487437322736, 0.0033899585250765085, 0.014059582725167274, 0.017724402248859406, 0.013299965299665928, -0.0016316778492182493, 0.004584356676787138, -0.0024887460749596357, 0.0039746640250086784, -0.019430210813879967, -0.017204664647579193, -0.009701778180897236, -0.019456863403320312, -0.0017857669154182076, 0.0337163470685482, -0.014166195876896381, 0.0077027855440974236, 0.0023038391955196857, 0.003831402864307165, -0.005277340766042471, 0.021349243819713593, -0.009748421609401703, -0.013020106591284275, 0.0133132915943861, -0.006963158026337624, -0.009068763814866543, -0.011953976936638355, -0.02230875939130783, -0.018017588183283806, -0.0030268083792179823, 0.0009944989578798413, 0.009941657073795795, -0.02206888049840927, 0.0014101228443905711, -0.010128229856491089, -0.0058470540679991245, -0.008095921017229557, -0.011081083677709103, -0.01704474538564682, -0.026293419301509857, 0.0010411420371383429, -0.0014725913060829043, -0.008648975752294064, 0.01757781021296978, -0.006223530974239111, 0.0011360942153260112, -0.026533298194408417, -0.018310774117708206, -0.03302336111664772, 0.03318328037858009, -0.009988300502300262, -0.033876266330480576, -0.0183507539331913, 0.005207376088947058, -0.013473211787641048, -0.0020423042587935925, 0.005070778541266918, -0.010587998665869236, -0.0156854297965765, 0.007862704806029797, 0.01032812986522913, -0.021349243819713593, -0.004967497196048498, 0.0034749158658087254, 0.012227172963321209, 0.0020706234499812126, 0.011760740540921688, 0.01505907904356718, 0.013479874469339848, 0.007049781270325184, -0.012600317597389221, 0.002543718321248889, 0.008002634160220623, 0.003303335513919592, -0.014659280888736248, 0.00932196993380785, -0.0077027855440974236, 0.019856661558151245, -0.02971835993230343, 0.01042141579091549, 0.012886839918792248, 0.02384132146835327, 0.022588618099689484, 0.008655638433992863, 0.003888041013851762, -0.022748537361621857, 0.00016585394041612744, -0.035422153770923615, -0.013126719743013382, -0.002710300963371992, 0.013533181510865688, 0.006286832503974438, 0.012886839918792248, -0.01757781021296978, -0.02468089759349823, 0.017364583909511566, 0.02154914289712906, 0.005447255447506905, -0.010128229856491089, -0.0028219115920364857, -0.0068032387644052505, -0.002025645924732089, 0.006739937234669924, 0.004847557749599218, 0.012520357966423035, -0.0072763338685035706, -0.016258474439382553, 0.011507535353302956, 0.028598923236131668, 0.03262356296181679, 0.023001743480563164, -0.02414783276617527, -0.018390733748674393, 0.002598690567538142, 0.0008878859807737172, 0.0012443730374798179, 0.003168403636664152, 0.010474721901118755, 0.022402046248316765, -0.01941688358783722, 0.02875884249806404, 0.0003606516111176461, 0.011480881832540035, 0.018857166171073914, 0.028625577688217163, -0.00849571917206049, 0.022921783849596977, -0.00012087659706594422, 0.02817247249186039, 0.008575678803026676, -0.004051291849464178, 0.03153077885508537, -0.010707938112318516, 0.0018573974957689643, 0.0009944989578798413, 0.004204547964036465, 0.032463643699884415, -0.026853136718273163, -0.013399914838373661, 0.0019190331222489476, 0.014326115138828754, 0.031157635152339935, 0.022215472534298897, 0.005020803771913052, -0.002633672906085849, 0.0012277147034183145, 0.023188317194581032, -0.004537713713943958, -0.013226669281721115, 0.003406616859138012, -0.019976601004600525, -0.013040096499025822, -0.005637159571051598, -0.0014459381345659494, 0.0180575679987669, 0.0024820826947689056, 0.024640917778015137, 0.010581335052847862, 0.025906946510076523, 0.012020610272884369, 0.01645837351679802, 0.0014925813302397728, -0.009102080948650837, -0.02242869883775711, 0.0006725777639076114, 0.012207183055579662, 0.012280479073524475, -0.011687444522976875, -0.010228179395198822, 0.004657653160393238, -0.007462906651198864, 0.006500058341771364, 0.0040013170801103115, -1.1660791642498225e-05, 0.01709805242717266, -0.023161662742495537, -5.312427310855128e-05, 0.0159786157310009, 0.008835548534989357, -0.005557199940085411, -0.010148219764232635, -0.007816062308847904, 0.011201023124158382, -0.00757618248462677, 0.008795568719506264, 0.006203541066497564, 0.020149847492575645, 0.0002575785620138049, -0.002617014804854989, -0.012953473255038261, -0.013466548174619675, -0.01030147634446621, 0.018017588183283806, 0.0038114129565656185, -0.014006276614964008, -0.0059803202748298645, 0.01556549035012722, -0.0056971292942762375, 0.0015317281940951943, 0.013319955207407475, 0.01681819185614586, 0.012826870195567608, -0.015352264977991581, -0.0068498821929097176, -0.018097547814249992, 0.010721264407038689, 0.04882873222231865, 0.04315159097313881, 0.0025637082289904356, -0.010941154323518276, 0.003691473277285695, -0.01936357654631138, -0.026959748938679695, -0.013499864377081394, 0.006393445190042257, -0.0021755704656243324, -0.007856042124330997, -0.004321156069636345, 0.016285128891468048, 0.0013526517432183027, 0.016618292778730392, 0.00711641414090991, -0.0014392748707905412, -0.0024820826947689056, -0.009448572993278503, -0.012260489165782928, 0.0029385194648057222, 0.0077027855440974236, 0.0076294890604913235, 0.0033932903315871954, 0.012073916383087635, -0.021349243819713593, 0.00772277545183897, 0.001691647688858211, 0.0002557045081630349, -0.02036307379603386, -0.014152868650853634, 0.01923030987381935, 0.010101577267050743, 0.018097547814249992, -0.0006234358879737556, 0.03286344185471535, -0.0044477591291069984, -0.01573873683810234, 0.007789408788084984, 0.004840894136577845, 0.009222020395100117, 0.004571030382066965, -0.003391624428331852, -0.008269166573882103, -0.00712974090129137, 0.00024820826365612447, -0.016604967415332794, 0.003399953478947282, -0.008662302047014236, -0.007556192576885223, 0.012080579996109009, -0.017737729474902153, -0.0012060590088367462, -0.01544555090367794, 0.028732189908623695, 0.02326827682554722, 0.004401115700602531, 0.006843218579888344, -0.0021672414150089025, -0.017564482986927032, -0.0298782791942358, -0.006749932188540697, -0.01136760599911213, -0.009301980026066303, -0.011380932293832302, -0.03041134402155876, -0.02349482849240303, -0.013333282433450222, -0.02017650008201599, 0.0037381164729595184, 0.010987796820700169, -0.017591137439012527, -0.024760857224464417, -0.016231821849942207, 0.0289987213909626, -0.013952969573438168, 0.0005209874943830073, 0.013106729835271835, 0.001535892835818231, 0.022588618099689484, -0.010861193761229515, -0.0224953331053257, 0.005863712169229984, -0.02414783276617527, -0.005843722261488438, 0.0168581735342741, -0.0039713322184979916, 0.006753263995051384, -0.002751946682110429, 0.01042141579091549, -0.006043621338903904, -0.0024654243607074022, -0.004880873952060938, -0.029371866956353188, 0.016351761296391487, -0.00872893538326025, 0.0019939953926950693, 0.007442916743457317, -0.00866896566003561, -0.004154573194682598, -0.015538837760686874, -0.001521733240224421, -0.009128733538091183, 0.001610854989849031, 0.020749544724822044, -0.019030410796403885, -0.013373262248933315, 0.016911478713154793, -0.023294929414987564, -0.00770944869145751, -0.010488049127161503, -0.018137527629733086, 0.009601828642189503, -0.02000325545668602, 0.0023937937803566456, 0.017417890951037407, -0.007442916743457317, 0.02194894105195999, -0.01030147634446621, -0.030198117718100548, 7.584720151498914e-05, -0.009808391332626343, 0.011094409972429276, 0.03563537821173668, 0.02206888049840927, 0.029211947694420815, -0.00876225158572197, -0.0030484639573842287, -0.014206175692379475, 0.007909348234534264, -0.005074109882116318, 0.0011727424571290612, -0.00779607193544507, -0.004184558056294918, -0.018843838945031166, -0.011447565630078316, -0.001529229455627501, 0.013646457344293594, -0.005264014471322298, -0.010661294683814049, -0.01505907904356718, 0.013673110865056515, 0.011394258588552475, -0.009168713353574276, -0.025720374658703804, -0.02982497215270996, -0.02165575511753559, 0.010108239948749542, -0.02060295268893242, 0.0008845542906783521, 0.021096037700772285, 0.0003396205429453403, -0.011647464707493782, -0.004904195666313171, 0.015818696469068527, -0.029371866956353188, -0.004824236035346985, 0.006163561251014471, 0.016231821849942207, 0.027119668200612068, 0.022681904956698418, -0.01163413841277361, 0.011707434430718422, 0.019869988784193993, -0.0034249410964548588, 0.009635144844651222, -0.00944190938025713, -0.013779724016785622, -0.016378413885831833, 0.0025637082289904356, 0.010008290410041809, 0.00675992714241147, 0.014486034400761127, -0.00941525585949421, 0.015485530719161034, 0.00900213047862053, -0.0016783210448920727, 0.0010244838194921613, -0.004670979920774698, -0.023508155718445778, -0.011907333508133888, 0.017417890951037407, -0.008628985844552517, 0.016551660373806953, -0.013639794662594795, -0.020389726385474205, 0.024547630921006203, 0.004644326400011778, 0.015698757022619247, 0.015045752748847008, 0.01859063282608986, -0.005986983422189951, 0.0007916844333522022, 0.0011752411955967546, 0.005747104529291391, -0.012340448796749115, 0.017471197992563248, -0.022215472534298897, -0.01505907904356718, 0.025080695748329163, 0.0010053267469629645, 0.011334288865327835, -0.00848905649036169, 0.014699260704219341, 0.011847363784909248, 0.004257854539901018, 0.010148219764232635, 0.005030798725783825, -0.010767907835543156, 0.006743269041180611, -0.0236814022064209, -0.031504128128290176, -0.0027719365898519754, -0.00801596138626337, 0.0159786157310009, 0.012300468981266022, -0.012140549719333649, 0.012200519442558289, -0.02113601751625538, -0.013393252156674862, 0.004514391999691725, -0.0007025626837275922, 0.049628328531980515, 0.007536202669143677, 0.005323984194546938, 0.01751117780804634, 0.0005526382010430098, -0.024707550182938576, 0.01723131723701954, -0.018364081159234047, 0.0014717584708705544, 0.04037965461611748, 0.025893619284033775, -0.01704474538564682, -0.013606477528810501, -0.00773610221222043, 0.024534305557608604, 0.013326618820428848, -0.017950955778360367, -0.01781768910586834, 0.019443536177277565, -0.002728625200688839, -0.005277340766042471, -0.007569519337266684, -0.04011312127113342, 0.015085732564330101, -0.0007675299420952797, -0.003831402864307165, -0.02206888049840927, -0.0016899817856028676, -0.022588618099689484, 0.00732297683134675, -0.036195095628499985, 0.01993662118911743, 0.011894007213413715, -0.0289987213909626, -0.007876032032072544, 0.0018640607595443726, -0.03286344185471535, 0.0014317785389721394, -0.0001593988563399762, 0.02846565656363964, -0.010747917927801609, -0.0015908650821074843, 0.011227676644921303, 0.008529036305844784, -0.017244644463062286, 0.007029791362583637, -0.0024487662594765425, 0.026293419301509857, -0.01399294938892126, -0.011021113954484463, -0.00037626875564455986, 0.006300158798694611, 0.00846240296959877, -0.0037414482794702053, -0.002617014804854989, -0.002217216184362769, -0.008595668710768223, 0.0039146943017840385, -0.0022521985229104757, 0.018750552088022232, -0.0013176694046705961, -0.022855151444673538, -0.011407585814595222, -0.006263510789722204, -0.013979623094201088, -0.008742261677980423, -0.0147925466299057, -0.026240112259984016, -0.014246155507862568, 0.005870375316590071, 0.001669991877861321, 0.021709062159061432, 0.00997497420758009, -0.014406074769794941, 0.02154914289712906, 0.027852632105350494, -0.023694727569818497, -0.0009420253336429596, -0.006356797181069851, -5.944921213085763e-05, -0.007616162765771151, 0.002901871223002672, 0.006876535248011351, -0.009801727719604969, 0.027452833950519562, -0.014152868650853634, -0.024174485355615616, -0.036728162318468094, -0.005860380362719297, 0.015512184239923954, -0.012793553993105888, -0.0024937435518950224, -0.0054305968806147575, 0.0006709119770675898, 0.01869724690914154, 0.02497408352792263, -0.012200519442558289, 0.019390230998396873, -0.004587688483297825, -0.0018057568231597543, 0.005710456054657698, -0.024001240730285645, -0.0072030373848974705, 0.008988804183900356, -0.0016566652338951826, 0.00902878399938345, -0.017964281141757965, -0.017950955778360367, 0.007063108030706644, 0.02273521199822426, 0.0026203463785350323, -0.015232325531542301, -0.03035803698003292, -0.0004576860519591719, -0.0049475072883069515, -0.001862394972704351, 0.00757618248462677, -0.008589006029069424, -0.021042730659246445, 0.0004306163755245507, -0.011854027397930622, 0.005647154524922371, -0.008628985844552517, 0.0052140397019684315, -0.016831519082188606, -0.011880680918693542, -0.033476464450359344, -0.020962771028280258, 0.0015800371766090393, 0.007689458783715963, 0.015458877198398113, -0.01517901849001646, -0.027199627831578255, -0.007422926370054483, -0.04048626869916916, -0.020043235272169113, -0.01721799187362194, -0.001014488865621388, 0.016938133165240288, 0.01645837351679802, -0.012160539627075195, 0.03203719109296799, 0.006903188303112984, 0.03331654518842697, -0.020522993057966232, -0.019430210813879967, 0.024534305557608604, -0.01059466227889061, 0.00726300710812211, 0.004221206530928612, -0.010461395606398582, -0.021349243819713593, 0.022468678653240204, 0.0023488164879381657, 0.00923534668982029, 0.021042730659246445, 0.004810909274965525, -0.02822577767074108, -0.008682291954755783, 0.01859063282608986, 0.0011410916922613978, 0.0033066673204302788, -0.0005917851813137531, -0.007123077753931284, 0.003501569153741002, 0.0036548252683132887, 0.000372104172129184, -0.0023554798681288958, -0.004674311727285385, 0.004730949643999338, -0.0043877894058823586, 0.0022005578503012657, -0.033822957426309586, -0.006120249629020691, -0.01000162772834301, -0.01645837351679802, 0.009895014576613903, -0.014139542356133461, -0.005670476239174604, 0.03355642408132553, 0.0039013675414025784, -0.012473715469241142, -0.011887343600392342, 0.0201231949031353, -0.013873009942471981, -0.005813737399876118, 0.0035348855890333652, -0.011414248496294022, 0.0016133537283167243, -0.0008570681675337255, -0.0008274997235275805, -0.015112385153770447, 0.002357145771384239, -0.004654321353882551, -0.006696626078337431, -0.01829744689166546, 0.0022871808614581823, 0.014486034400761127, -0.025733700022101402, -0.012666950933635235, -0.020629605278372765, 0.02017650008201599, 0.0005101596470922232, -0.005104094743728638, -0.009881687350571156, -0.010221516713500023, 0.014779220335185528, 0.02390795387327671, -0.013513191603124142, 0.0008241680916398764, 0.013566497713327408, 0.014419401064515114, -0.0036481618881225586, 0.008382443338632584, 0.2319897711277008, 0.005717119202017784, 0.01733793132007122, 0.03243698924779892, -0.006416766904294491, 0.03366303816437721, 0.0075428662821650505, -0.010101577267050743, -0.008415759541094303, 0.021389223635196686, 0.016245149075984955, 0.014565994031727314, -0.005157401319593191, 0.005254019517451525, -0.002037306781858206, -0.0019356913398951292, -0.02314833737909794, -0.021709062159061432, -0.03520892560482025, -0.016711579635739326, 0.0011485879076644778, -0.022002248093485832, 0.019137024879455566, -0.010961144231259823, 0.014605973847210407, -0.016205167397856712, -0.019989928230643272, -0.0016983109526336193, 0.021615775302052498, 0.02088281139731407, -0.013593151234090328, 0.0012893503298982978, 0.012740247882902622, -0.0039713322184979916, -0.03131755441427231, -0.005627164617180824, 0.030517956241965294, -0.003758106380701065, 0.02557378076016903, -0.00842908676713705, 0.006250184029340744, -0.024334406480193138, 0.006446751765906811, -0.014326115138828754, 0.004461085423827171, 0.026946423575282097, 0.0011027776636183262, -0.015485530719161034, 0.0011869019363075495, 0.001221884391270578, -0.020629605278372765, -0.001829078420996666, 0.019256964325904846, 0.0014559330884367228, 0.017724402248859406, -0.015338937751948833, 0.018430713564157486, -0.0014534343499690294, 0.011234339326620102, 0.0039713322184979916, -0.00842908676713705, 0.009868361055850983, -0.023867974057793617, 0.026013558730483055, -0.021295936778187752, 0.008262503892183304, -0.029211947694420815, -0.012380428612232208, -0.001425115275196731, -0.01050803903490305, 0.003055127337574959, -0.0064367568120360374, 0.01871057227253914, 0.0061135864816606045, -0.02124262973666191, -0.009608492255210876, 0.020669585093855858, 0.02409452572464943, 0.02698640339076519, 0.015658777207136154, -0.01965676248073578, -0.000673827133141458, -0.015485530719161034, -0.03265021741390228, -0.021215977147221565, -0.03363638371229172, -0.010607988573610783, -0.0035415489692240953, 0.0010269825579598546, -0.023174989968538284, -0.019216984510421753, -0.016884826123714447, -0.007063108030706644, -0.014672607183456421, 0.01184070110321045, 0.016658272594213486, -0.00860899593681097, 0.026266764849424362, 0.007049781270325184, 0.012373764999210835, -0.03544880449771881, 0.04533715546131134, 0.01857730560004711, 0.006006973329931498, 0.006929841823875904, 0.005157401319593191, -0.015045752748847008, -0.008988804183900356, -0.0008270832477137446, -0.0008987138280645013, 0.006133576389402151, -0.004727617837488651, 0.010554681532084942, -0.020989423617720604, 0.0014151203213259578, 0.01632510870695114, 0.0036548252683132887, -0.011667454615235329, 0.011047766543924809, -0.014899159781634808, -0.00724968034774065, 0.0019823345355689526, -0.013779724016785622, 0.0042078797705471516, -0.010794561356306076, -0.008682291954755783, -0.01699143834412098, -0.008415759541094303, 0.016525007784366608, -0.019909968599677086, 0.009608492255210876, -0.0006575853331014514, 0.017684422433376312, 0.00045102275907993317, -0.01529895793646574, -0.0018340758979320526, 0.006020300090312958, 0.01723131723701954, -0.02763940766453743, 0.011314298957586288, 0.01723131723701954, 0.001929028076119721, -0.00789602193981409, -0.0028718863613903522, -0.00982838124036789, -0.0147925466299057, 0.0355021134018898, -0.018217487260699272, -0.0039713322184979916, -0.01633843407034874, -0.022575292736291885, -0.009541858918964863, 0.01411288883537054, 0.016138534992933273, 0.0367015078663826, -0.012753574177622795, -0.011001124046742916, -0.03656824305653572, 0.024014566093683243, -0.007302986923605204, -0.038913726806640625, 0.005124084651470184, 0.03504900634288788, -0.02141587622463703, -0.0069365049712359905, -0.009108743630349636, -0.1745253950357437, 0.014486034400761127, 0.0027152984403073788, -0.013626467436552048, 0.023188317194581032, -0.005583852995187044, 0.03981993719935417, 0.0023454849142581224, 0.011347616091370583, 0.005723782815039158, -0.0018307442078366876, -0.01764444261789322, -0.02006988786160946, -0.006383450236171484, -0.005627164617180824, 0.0028602255042642355, -0.021455856040120125, -0.007995971478521824, 0.014152868650853634, 0.012800217606127262, 0.009881687350571156, -0.014272809028625488, 0.026120172813534737, -0.018217487260699272, 0.0029451826121658087, -0.004944175481796265, -0.010827877558767796, 0.021269284188747406, -0.001584201818332076, 0.0069365049712359905, 0.008115910924971104, 0.011407585814595222, 0.015072405338287354, 0.011907333508133888, 0.012860187329351902, 0.004557703621685505, 0.029265254735946655, -0.00046559874317608774, -0.008202534168958664, 0.011287646368145943, -0.0017641111044213176, 0.012680277228355408, -0.0012718591606244445, -0.020029908046126366, 0.004171231761574745, 0.019443536177277565, 0.036488283425569534, 9.620152559364215e-05, 0.014592647552490234, -0.01669825240969658, 0.013093402609229088, -0.027119668200612068, -0.01157416868954897, -0.005993646569550037, 0.016538333147764206, 0.008842211216688156, -0.021282609552145004, 0.010248169302940369, -0.003131755394861102, -0.005177391227334738, 0.010607988573610783, -0.01651168055832386, 0.002858559601008892, 0.0013060086639598012, -0.0039713322184979916, -0.018017588183283806, -0.031983885914087296, 0.007356293499469757, -0.00017574478988535702, 0.006196877453476191, 0.0003977162705268711, -0.020149847492575645, -0.0037747647147625685, 0.006606671027839184, 0.004297834355384111, 0.004631000105291605, -0.012726920656859875, 0.020376399159431458, -0.012507031671702862, 0.0017091388581320643, -0.0036381669342517853, 0.017324604094028473, 0.002372138202190399, 0.00934862345457077, -0.0008299984619952738, 0.005387285724282265, -0.009835044853389263, -2.6783380235428922e-05, 0.002413783920928836, -0.010474721901118755, 0.02593359909951687, -0.02971835993230343, -0.013333282433450222, -0.01752450317144394, -1.2246433470863849e-05, 0.022295432165265083, 0.0011894006747752428, 0.0005942839197814465, 0.0010269825579598546, 0.003498237347230315, -0.0034149461425840855, -0.011320962570607662, -0.03001154586672783, 0.018084222450852394, 0.04786921292543411, 0.001147755072452128, -0.00973509531468153, 0.0147925466299057, 0.04472413286566734, 0.0029784992802888155, -0.03699469193816185, 1.1153234481753316e-05, 0.006396776996552944, 0.017857668921351433, 0.024894123896956444, 0.03350311890244484, 0.005673808045685291, -0.016205167397856712, -0.0027602759655565023, 0.011127726174890995, 0.04523054510354996, 0.00016856090223882347, -0.024867471307516098, 0.021402548998594284, 0.0013751405058428645, -0.009328632615506649, -0.08976810425519943, -0.030144810676574707, 0.02533390186727047, 0.049868207424879074, -0.005463913548737764, 0.03496904671192169, 0.00042332836892455816, 0.022122187539935112, -0.0028968737460672855, 0.0006134409341029823, -0.009128733538091183, -0.009388603270053864, -0.028199125081300735, -0.010994460433721542, 0.0073363035917282104, 0.005360632203519344, 0.00956184882670641, -0.0053473059087991714, -0.017964281141757965, 0.03078448958694935, 0.00048517220420762897, -0.005257350858300924, 0.00711641414090991, -0.024827491492033005, -0.007682795636355877, -0.007482896558940411, -0.02851896360516548, 0.026773177087306976, 0.004311161115765572, -0.0029568434692919254, -0.023588115349411964, -0.016738232225179672, 0.012280479073524475, -0.015072405338287354, -0.0021122691687196493, 0.013133382424712181, -0.03632836416363716, -0.012280479073524475, 0.03416945040225983, -0.011094409972429276, 0.008322473615407944, 0.02894541621208191, -0.007289660628885031, -0.05237361043691635, 0.0014192848466336727, -0.010021617636084557, 0.004877542611211538, 0.013146709650754929, -0.007476232945919037, -0.02390795387327671, -0.02296176366508007, 0.011027776636183262, -0.023641422390937805, 0.005807074252516031, 0.010528028942644596, 0.000825833878479898, 0.015458877198398113, 0.023228297010064125, -0.011287646368145943, 0.00032421163632534444, -0.022348739206790924, -0.0031150970607995987, -0.008855538442730904, 0.01847069337964058, -0.018803859129548073, 0.01006159745156765, -0.01615186221897602, 0.003584860358387232, 0.008029287680983543, -0.011061093769967556, 0.004644326400011778, 0.0006188548286445439, -0.010454731993377209, 0.0004158321535214782, -0.017604462802410126, -0.0006542537012137473, -0.03480912744998932, -0.034062836319208145, 0.01977670192718506, -0.003868051106110215, -0.016058575361967087, -0.015285631641745567, 4.776239438797347e-05, -0.011374268680810928, 0.014899159781634808, 0.016844846308231354, 0.0038480611983686686, 0.0021156007423996925, 0.02982497215270996, -0.040273040533065796, 0.010587998665869236, 0.003958005923777819, 0.012533685192465782, -0.029211947694420815, -0.0222021471709013, 0.008662302047014236, 0.01911037042737007, -0.0048142410814762115, 0.020203154534101486, -0.002661992097273469, -0.04256521910429001, -0.020736219361424446, -0.06119583174586296, 0.020256459712982178, -0.0033299888018518686, -0.038860421627759933, -0.00705644441768527, 0.006856545340269804, -0.011700770817697048, -0.017671097069978714, -0.012293805368244648, 0.010581335052847862, -0.02272188477218151, 0.006190214306116104, 0.0024870801717042923, -0.00944190938025713, -0.010341456159949303, -0.012880177237093449, 0.03766102343797684, 0.006183551158756018, 0.012447061948478222, 0.016085227951407433, 0.007003138307482004, -0.025840314105153084, 0.005870375316590071, 0.00816255435347557, -0.01721799187362194, 0.014752566814422607, -0.014859179966151714, -0.0014051253674551845, -0.03379630669951439, -0.005170728079974651, -0.002537054941058159, -0.03747445344924927, -0.001440107706002891, 0.0017074730712920427, -0.008688955567777157, 0.012207183055579662, -0.01423282828181982, 0.03574199229478836, 0.013173362240195274, 0.016245149075984955, -0.006516716443002224, -0.045603688806295395, 0.0144993606954813, -0.02592027373611927, -0.015392244793474674, 0.03531553968787193, -0.03118428774178028, 0.011594158597290516, 0.041099291294813156, 0.006296827457845211, 0.026146825402975082, 0.008395769633352757, -0.030971061438322067, -0.010961144231259823, 0.019043738022446632, -0.004354472737759352, 0.011580831371247768, 0.005224034655839205, 0.004754271358251572, -0.010554681532084942, 0.034915741533041, -0.002883547218516469, 0.0165783129632473, 0.010821213945746422, 0.0014667609939351678, 0.021469183266162872, -0.011747414246201515, -0.0006238523637875915, 0.00778274517506361, -0.02492077648639679, -0.018364081159234047, -0.012733584269881248, 0.0015558827435597777, 0.017204664647579193, 0.031237594783306122, 0.020336419343948364, 0.006026963237673044, 0.008575678803026676, -0.0010453066788613796, 0.02556045539677143, 0.0331566259264946, 0.0059803202748298645, -0.03289009630680084, 0.014712586998939514, 0.014992445707321167, 0.009835044853389263, -0.005297331139445305, 0.009941657073795795, -0.012487041763961315, 0.0008349959389306605, -0.01989664137363434, 0.013473211787641048, 0.009895014576613903, 0.003784759668633342, -0.018750552088022232, -0.02337488904595375, 0.005827064160257578, -0.0014367761323228478, 0.03243698924779892, 0.023801341652870178, 0.013026770204305649, 0.023748034611344337, -0.001625014585442841, -0.014392748475074768, -0.010727928020060062, 0.009268662892282009, -0.019563475623726845, -0.041339170187711716, -0.0067466008476912975, 0.012420408427715302, -0.0002298841718584299, -0.010647968389093876, 0.006073606666177511, 0.012233835645020008, -0.00997497420758009, -0.000403546669986099, -0.00825584027916193, 0.011314298957586288, -0.031983885914087296, 0.026240112259984016, -0.01036144606769085, 0.013126719743013382, 0.034409329295158386, -0.0036348351277410984, 0.01959013007581234, -0.0005884534912183881, 0.020203154534101486, -0.012053926475346088, 0.0023321581538766623, 0.011054430156946182, -0.0011027776636183262, 0.018617285415530205, -0.024347731843590736, -0.018097547814249992, -0.0037780962884426117, -0.006323480512946844, -0.018137527629733086, 0.020549645647406578, -0.0008420757367275655, 0.055012281984090805, 0.008069267496466637, -0.03006485104560852, 0.011001124046742916, 0.007096424233168364, 0.021642427891492844, 0.017417890951037407, 0.011347616091370583, -0.011967303231358528, 0.00724968034774065, 0.03683477267622948, 0.00964847207069397, -0.0020456360653042793, -0.03177065774798393, -0.03989989683032036, 0.0149391395971179, -0.0055072251707315445, 0.007442916743457317, -0.005913686938583851, 0.004404447507113218, 0.012973463162779808, 0.019043738022446632, 0.008055941201746464, 0.006423430051654577, -0.023095030337572098, -0.0024087862111628056, 0.03201053664088249, -0.029131988063454628, -0.007742765359580517, -0.011860691010951996, 0.021335916593670845, 0.01071460172533989, -0.01899043098092079, -0.02841235138475895, 0.015218998305499554, 0.003225041786208749, -0.006193546112626791, -0.010428079403936863, 0.00739627331495285, -0.006166892591863871, 0.022868476808071136, 0.039206910878419876, -0.019216984510421753, 0.0018607291858643293, -0.01036144606769085, -0.014406074769794941, -0.020336419343948364, 0.012780227698385715, -0.019083717837929726]\n"
     ]
    }
   ],
   "source": [
    "from langchain.embeddings import OpenAIEmbeddings\n",
    "embeddings = OpenAIEmbeddings(\n",
    "    openai_api_key=\"ANYTHING or None, if set None, plz ensure you have set azure apikey in the proxy server\",\n",
    "    openai_api_base=\"http://127.0.0.1:8080/v1\",\n",
    ")\n",
    "text = \"This is a test document.\"\n",
    "query_result = embeddings.embed_query(text)\n",
    "print(query_result)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2023-06-16T08:36:03.640759Z",
     "start_time": "2023-06-16T08:36:01.950382Z"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "Above shows the usage of azure-openai-proxy with langchain, based on the examples, it's very esay to implement a qna system based on your private docuements.✈️"
   ],
   "metadata": {
    "collapsed": false
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
